package service;

import dao.UserDao;
import pojo.User;

import java.sql.SQLException;

//接受客户端
public class UserService {
    public boolean UserLogin(User loginuser) throws SQLException{
        //校验:传递的数据是否合法
        if(loginuser== null){
            throw new RuntimeException("用户数据不合法");
        }

        //省略复杂的逻辑

        //调用dao层的方法
        UserDao userdao = new UserDao();
         User user =userdao.CheckLogin(loginuser);

        if(user != null){
            return true;
        }

        return false;
    }
}
